#include<iostream>
using namespace std;
int main()
{

	int PrePrice = 0;
	int gap = 0;
	cin >> PrePrice >> gap;

	int LowPrice = PrePrice - gap;
	int r = LowPrice % 10;

	if (r != 9)
	{
		LowPrice = LowPrice + (9 - r);
	}
	int count = (PrePrice - LowPrice) / 10 + 1;

	int FinPrice = LowPrice + 10 * (count - 1);
	cout << FinPrice << endl;

	return 0;
}